package com.mh.rpc.consumer;

import com.mh.rpc.api.service.IUserService;
import com.mh.rpc.consumer.proxy.RpcClientProxy;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class ClientBootStrapApplication {

    @Bean
    public IUserService userService() {
        return (IUserService) RpcClientProxy.createProxy(IUserService.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(ClientBootStrapApplication.class, args);
    }
}
